// 2025/07/28
// Author: Forever
#include <bits/stdc++.h>
using namespace std;

signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int l, r;
    while (cin >> l >> r) {
        int res = 0;
        for (int i = min(l, r); i <= max(l, r); ++i) {
            int x = i, cnt = 0;
            while (x != 1) {
                if (x & 1)
                    x = 3 * x + 1;
                else
                    x = x / 2;
                ++cnt;
            }
            res = max(res, cnt + 1);
        }
        cout << l << " " << r << " " << res << endl;
    }
    return 0;
}